package com.xunyin.event;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;


/**
 * @Author xunyinyunshang  <3594419785@qq.com>
 * 模板监听枚举
 */
@Getter
@AllArgsConstructor
public enum TemplateListenEnum {
    TYPE_1("1", "支付成功模板通知"),
    TYPE_2("2", "退款成功通知"),
    TYPE_3("3", "发货成功通知"),
    TYPE_4("4", "充值成功通知"),
    TYPE_5("5", "在线买单/收款成功通知"),
    TYPE_6("6", "商家收款通知"),
    TYPE_7("7", "用户下单未支付通知"),
    TYPE_8("8", "用户提现通知"),
    TYPE_9("9", "退款申请通知"),
    TYPE_10("10", "订单结束提醒给保洁员通知"),
    TYPE_11("11", "用户下单成功通知保洁员"),
    TYPE_12("12", "公众号消息订单结束提醒给保洁员通知"),
    TYPE_13("13", "公众号消息用户下单成功通知保洁员"),
    TYPE_14("14", "公众号消息用户充值成功通知门店管理员"),
    TYPE_15("15", "公众号消息取消订单通知");
    private String value;
    private String desc;

    public static TemplateListenEnum toType(String value) {
        return Stream.of(TemplateListenEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }
}
